import use_case.processRental.Customer;
import use_case.processRental.Ledger;
import use_case.processRental.Sale;
import junit.framework.TestCase;


public class LedgerTest extends TestCase {
	private Ledger ledger;
	private Customer customer;
	private Sale sale;
	
	protected void setUp(){
		ledger = new Ledger();
		customer = new Customer("Tamer", "1231516460");
		sale = new Sale(null);
	}
	
	protected void tearDown(){
		ledger = null;
		customer = null;
		sale = null;
	}
	
	public void testAddCustomer(){
		setUp();
		int expected = ledger.getNumberOfCustomers() + 1;
		ledger.addCustomer(customer);
		assertEquals(expected, ledger.getNumberOfCustomers());
		tearDown();
	}
	
	public void testAddSale(){
		setUp();
		int expected = ledger.getNumberOfSales() + 1;
		ledger.addSale(sale);
		assertEquals(expected, ledger.getNumberOfSales());
		tearDown();
	}

}
